Hi All,
I am a bit suspicious of a script I wrote to delete all links going through a specific link module. It appears to work fine (the links are deleted) but what aroused my concerns is that it only takes about 5 seconds to run! But when I use the DOORS built in function (Link->Delete Links etc.) it can take up to 30 mins to execute.
Does anyone have an explanation for this? Is it safe/correct to delete links the way I did it below or is there something else that needs to be done which is why the DOORS functions takes much longer?
Much Appreciated!
for o in current Module do
{
if (!isDeleted(o))
{
/* Increment the ProgressBar and cancel feature */
progressStep ++step
if (progressCancelled) {
if(confirm("Exit loop?")) {
progressStop
halt
}
}
Link MFDLink
for MFDLink in (o) -> "/MyLinks" do {
// If we fall in here the object has an MFD link
// Delete it!
delete(MFDLink)
}
}
}
gpolley - Mon Sep 21 04:58:48 EDT 2009 |
|
Re: Deleting links using DOORS built in function - why is it slow? SystemAdmin - Mon Sep 21 10:10:50 EDT 2009
In the script you only deleted outgoing links -- this may explain time difference.
|
|
Re: Deleting links using DOORS built in function - why is it slow? gpolley - Mon Sep 21 10:35:56 EDT 2009 SystemAdmin - Mon Sep 21 10:10:50 EDT 2009
In the script you only deleted outgoing links -- this may explain time difference.
hmmm..didn't think of this but actually there are no incoming links so this can't be it
Is it correct how I deleted the link? i.e. deleted(myLink)
Much appreciated!
|
|
Re: Deleting links using DOORS built in function - why is it slow? SystemAdmin - Mon Sep 21 10:59:54 EDT 2009
The script looks fine and is faster because you specified that is only outlinks from X link module, so is going to be faster. I had the same question before and the reason was that the tool in DOORS check for all objects with out-links and in-links and then for the In-links, the tool open every module in exclusive edit to delete the links, because as you know links reside in the source module.
|
|
Re: Deleting links using DOORS built in function - why is it slow? gpolley - Wed Sep 23 05:18:34 EDT 2009 SystemAdmin - Mon Sep 21 10:59:54 EDT 2009
The script looks fine and is faster because you specified that is only outlinks from X link module, so is going to be faster. I had the same question before and the reason was that the tool in DOORS check for all objects with out-links and in-links and then for the In-links, the tool open every module in exclusive edit to delete the links, because as you know links reside in the source module.
much appreciated. Makes sense to me now.
|
|